<?php
/**
 * userLoginDao
 */

class Dao_UserSetModel extends Dao_BaseModel {

    protected $_table = 'user_set';

    const NORMAL_STATUS = 1;
    const REDIS_KEYWORD = 'USER_SET_KEY_';
    const EXTIME        = '86400';

    public function __construct ()
    {
        parent::__construct ();
    }
    
    /**
     * 获取用户设置
     */
    public function getSet( $where )
    {
        if( !$where['set_user_id'] ){
            return false;
        }
        $w   = [];
        $w[] = [ 'set_user_id' , $where['set_user_id'] ];
        $info = parent::getOne( '*' , $w );
        return $info;
    }
    
    /**
     * 新增记录
     */
    public function addSet($data)
    {
        $info = parent::add ( $data );
        return $info;
    }
    
    /**
     * 删除记录
     */
    public function delSet($data)
    {
        $info = parent::del($data);
        return $info;
    }

}
